package sessionBeans.Interfaces;

import java.io.Serializable;
import java.util.Set;

import javax.ejb.Local;
import javax.ejb.Remote;

@Local
public interface IGestCrudRemote<T> extends Serializable {
	
	/**
	 * Persists an entity of type T
	 * @param entity
	 */
	public void create(T entity);
	
	/**
	 * Finds an entity by it's id
	 * @param id
	 * @return entity of id entered as a parameter
	 */
	public T find(long id);	
	
	/**
	 * Updates entity to the values of the parameter
	 * @param entity
	 */
	public void update(T entity);
	
	/**
	 * Removes entity of type T
	 * @param entity
	 */
	public void delete(T entity);
}
